﻿//===================================================================================
// Copyright (c) Ryan Garrett.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===================================================================================

using System;

namespace Caffeine.Core.Test.TestModel
{
    public class ModelForGraphTests : ModelBase
    {
        private readonly ModelProperty<String> _stringProperty;
        private readonly ModelProperty<ModelForGraphTests> _child1;
        private readonly ModelProperty<ModelForGraphTests> _child2;
        private readonly ModelProperty<ModelForGraphTests> _child3;
        private readonly ModelProperty<ModelForGraphTests> _child4;
        private readonly ModelProperty<ModelForGraphTests> _child5;
        private readonly ModelCollection<ModelForGraphTests> _childrenCollection1;
        private readonly ModelCollection<ModelForGraphTests> _childrenCollection2;
        private readonly ModelCollection<ModelForGraphTests> _childrenCollection3;
        private readonly ModelCollection<ModelForGraphTests> _childrenCollection4;
        private readonly ModelCollection<ModelForGraphTests> _childrenCollection5;
        private readonly ModelCommand<String> _command;

        public ModelForGraphTests()
        {
            _stringProperty = RegisterProperty<String>("StringProperty");
            _child1 = RegisterProperty<ModelForGraphTests>("Child1");
            _child2 = RegisterProperty<ModelForGraphTests>("Child2");
            _child3 = RegisterProperty<ModelForGraphTests>("Child3");
            _child4 = RegisterProperty<ModelForGraphTests>("Child4");
            _child5 = RegisterProperty<ModelForGraphTests>("Child5");
            _childrenCollection1 = RegisterCollectionProperty<ModelForGraphTests>("ChildrenCollection1");
            _childrenCollection2 = RegisterCollectionProperty<ModelForGraphTests>("ChildrenCollection2");
            _childrenCollection3 = RegisterCollectionProperty<ModelForGraphTests>("ChildrenCollection3");
            _childrenCollection4 = RegisterCollectionProperty<ModelForGraphTests>("ChildrenCollection4");
            _childrenCollection5 = RegisterCollectionProperty<ModelForGraphTests>("ChildrenCollection5");
            _command = RegisterCommand<String>((p1, p2) => { });
        }

        public ModelProperty<String> StringProperty
        {
            get
            {
                return _stringProperty;
            }
        }

        public ModelProperty<ModelForGraphTests> Child1
        {
            get
            {
                return _child1;
            }
        }

        public ModelProperty<ModelForGraphTests> Child2
        {
            get
            {
                return _child2;
            }
        }

        public ModelProperty<ModelForGraphTests> Child3
        {
            get
            {
                return _child3;
            }
        }

        public ModelProperty<ModelForGraphTests> Child4
        {
            get
            {
                return _child4;
            }
        }

        public ModelProperty<ModelForGraphTests> Child5
        {
            get
            {
                return _child5;
            }
        }

        public ModelCollection<ModelForGraphTests> ChildrenCollection1
        {
            get
            {
                return _childrenCollection1;
            }
        }

        public ModelCollection<ModelForGraphTests> ChildrenCollection2
        {
            get
            {
                return _childrenCollection2;
            }
        }

        public ModelCollection<ModelForGraphTests> ChildrenCollection3
        {
            get
            {
                return _childrenCollection3;
            }
        }

        public ModelCollection<ModelForGraphTests> ChildrenCollection4
        {
            get
            {
                return _childrenCollection4;
            }
        }

        public ModelCollection<ModelForGraphTests> ChildrenCollection5
        {
            get
            {
                return _childrenCollection5;
            }
        }

        public ModelCommand<String> Command
        {
            get
            {
                return _command;
            }
        }
    }
}
